[maemo-developers] HAL context initializing failure

From: daniel wilms daniel.wilms at nokia.com
Date: Tue May 18 14:33:12 EEST 2010
Hi,

ext Pallavi Kandhare wrote:
> Please can anybody tell me why am I getting this error in foll code?
> Your help is appreciated
>
>
> Code:
> DBusConnection *connection;
> DBusError error;
> LibHalContext *ctx;
> dbus_error_init(&error);
> if((connection = dbus_bus_get(DBUS_BUS_SYSTEM,&error)) == NULL)
> {
> printf("Error %s\n",error.message);
> return 1;
> }
> if ( dbus_error_is_set(&error) )
> {
> printf("Unable to connect to DBus: %s\n",error.message);
> return 1;
> }
> if((ctx = libhal_ctx_new())==NULL)
> {
> printf("Error %s\n",error.message);
> return 1;
> }
> if ( !libhal_ctx_set_dbus_connection(ctx, connection) )
> {
> printf("Error %s\n",error.message);
> return 1;
> }
> if ( !libhal_ctx_init(ctx, &error) )
> {
> printf("Hal context initializing failure %s\n",error.message);
> return 1;
> }
>
>

Where are you running it, inside scratchbox or on device?

Daniel
More information about the maemo-developers mailing list