Lines 178-184
void
Link Here
|
178 |
add_sharepath_to_iter(Share *share, gpointer user_data) |
178 |
add_sharepath_to_iter(Share *share, gpointer user_data) |
179 |
{ |
179 |
{ |
180 |
DBusMessageIter *iter = (DBusMessageIter *)user_data; |
180 |
DBusMessageIter *iter = (DBusMessageIter *)user_data; |
|
|
181 |
#ifndef DBUS_USE_NEW_API |
181 |
dbus_message_iter_append_string(iter, share->sharepath); |
182 |
dbus_message_iter_append_string(iter, share->sharepath); |
|
|
183 |
#else /* DBUS_USE_NEW_API */ |
184 |
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &share->sharepath); |
185 |
#endif /* DBUS_USE_NEW_API */ |
182 |
} |
186 |
} |
183 |
/******************************************************************************/ |
187 |
/******************************************************************************/ |
184 |
DBusHandlerResult |
188 |
DBusHandlerResult |
Lines 586-597
path_message_func (DBusConnection *conn
Link Here
|
586 |
else if (dbus_message_is_method_call (message, SMBPARSER_DBUS_INTERFACE, "GetSharepaths")) { |
590 |
else if (dbus_message_is_method_call (message, SMBPARSER_DBUS_INTERFACE, "GetSharepaths")) { |
587 |
DBusMessage *reply_message = NULL; |
591 |
DBusMessage *reply_message = NULL; |
588 |
DBusMessageIter iter; |
592 |
DBusMessageIter iter; |
|
|
593 |
char *empty_string = ""; |
589 |
|
594 |
|
590 |
reply_message = dbus_message_new_method_return (message); |
595 |
reply_message = dbus_message_new_method_return (message); |
591 |
|
596 |
|
592 |
dbus_message_iter_init(reply_message, &iter); |
597 |
dbus_message_iter_init(reply_message, &iter); |
593 |
g_slist_foreach(shares,(GFunc)add_sharepath_to_iter,&iter); |
598 |
g_slist_foreach(shares,(GFunc)add_sharepath_to_iter,&iter); |
594 |
dbus_message_iter_append_string(&iter, ""); |
599 |
#ifndef DBUS_USE_NEW_API |
|
|
600 |
dbus_message_iter_append_string(&iter, empty_string); |
601 |
#else /* DBUS_USE_NEW_API */ |
602 |
dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &empty_string); |
603 |
#endif /* DBUS_USE_NEW_API */ |
595 |
|
604 |
|
596 |
if (reply_message) |
605 |
if (reply_message) |
597 |
{ |
606 |
{ |