Commit 07b825b1 authored by Zeeshan Ali (Khattak)'s avatar Zeeshan Ali (Khattak)
Browse files

Coding style fixes: Use spaces not tabs

parent 86be5dbc
......@@ -128,13 +128,13 @@ gupnp_context_constructor (GType type,
guint n_props,
GObjectConstructParam *props)
{
GObject *object;
GUPnPContext *context;
GObject *object;
GUPnPContext *context;
char *user_agent;
object = G_OBJECT_CLASS (gupnp_context_parent_class)->constructor
object = G_OBJECT_CLASS (gupnp_context_parent_class)->constructor
(type, n_props, props);
context = GUPNP_CONTEXT (object);
context = GUPNP_CONTEXT (object);
context->priv->session = soup_session_async_new_with_options
(SOUP_SESSION_IDLE_TIMEOUT,
......@@ -151,13 +151,13 @@ gupnp_context_constructor (GType type,
NULL);
g_free (user_agent);
if (g_getenv ("GUPNP_DEBUG")) {
SoupLogger *logger;
logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
soup_logger_attach (logger, context->priv->session);
}
if (g_getenv ("GUPNP_DEBUG")) {
SoupLogger *logger;
logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
soup_logger_attach (logger, context->priv->session);
}
return object;
return object;
}
static void
......@@ -809,7 +809,7 @@ host_path_handler (SoupServer *server,
char *length;
length = g_strdup_printf ("%lu", (gulong) st.st_size);
soup_message_headers_append (msg->response_headers,
soup_message_headers_append (msg->response_headers,
"Content-Length",
length);
g_free (length);
......
......@@ -623,7 +623,7 @@ load_description (GUPnPControlPoint *control_point,
g_list_prepend (control_point->priv->pending_gets,
data);
soup_session_queue_message (session,
soup_session_queue_message (session,
data->message,
(SoupSessionCallback)
got_description_url,
......@@ -823,7 +823,7 @@ gupnp_control_point_set_property (GObject *object,
switch (property_id) {
case PROP_RESOURCE_FACTORY:
control_point->priv->factory =
GUPNP_RESOURCE_FACTORY (g_value_dup_object (value));
GUPNP_RESOURCE_FACTORY (g_value_dup_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
......
......@@ -86,7 +86,7 @@ gupnp_device_info_set_property (GObject *object,
switch (property_id) {
case PROP_RESOURCE_FACTORY:
info->priv->factory =
GUPNP_RESOURCE_FACTORY (g_value_dup_object (value));
GUPNP_RESOURCE_FACTORY (g_value_dup_object (value));
break;
case PROP_CONTEXT:
info->priv->context = g_object_ref (g_value_get_object (value));
......
......@@ -156,7 +156,7 @@ create_loopback_context (gpointer data)
NULL);
if (error) {
g_warning ("Error creating GUPnP context: %s\n",
error->message);
error->message);
g_error_free (error);
return FALSE;
......@@ -189,7 +189,7 @@ create_context_for_device (NMDevice *nm_device, const char *iface)
NULL);
if (error) {
g_warning ("Error creating GUPnP context: %s\n",
error->message);
error->message);
g_error_free (error);
......
......@@ -274,7 +274,7 @@ gupnp_resource_factory_create_device
if (value)
device_type = GPOINTER_TO_INT (value);
g_free (upnp_type);
g_free (upnp_type);
}
device = g_object_new (device_type,
......@@ -336,7 +336,7 @@ gupnp_resource_factory_create_service
if (value)
service_type = GPOINTER_TO_INT (value);
g_free (upnp_type);
g_free (upnp_type);
}
service = g_object_new (service_type,
......
......@@ -439,7 +439,7 @@ gupnp_root_device_constructor (GType type,
"url-base", url_base,
NULL);
soup_uri_free (url_base);
soup_uri_free (url_base);
/* Create resource group */
device->priv->group = gssdp_resource_group_new (GSSDP_CLIENT (context));
......
......@@ -693,7 +693,7 @@ begin_action_msg (GUPnPServiceProxy *proxy,
/* Specify action */
full_action = g_strdup_printf ("\"%s#%s\"", service_type, action);
soup_message_headers_append (ret->msg->request_headers,
"SOAPAction",
"SOAPAction",
full_action);
g_free (full_action);
......@@ -882,8 +882,8 @@ gupnp_service_proxy_begin_action_valist
g_free (collect_error);
/* we purposely leak the value here, it might not be
* in a sane state if an error condition occoured
*/
* in a sane state if an error condition occoured
*/
}
arg_name = va_arg (var_args, const char *);
......@@ -1073,7 +1073,7 @@ check_action_response (GUPnPServiceProxy *proxy,
response = xmlRecoverMemory (action->msg->response_body->data,
action->msg->response_body->length);
if (!response) {
if (!response) {
if (action->msg->status_code == SOUP_STATUS_OK) {
g_set_error (error,
GUPNP_SERVER_ERROR,
......@@ -1088,7 +1088,7 @@ check_action_response (GUPnPServiceProxy *proxy,
}
return NULL;
}
}
/* Get parameter list */
*params = xml_util_get_element ((xmlNode *) response,
......@@ -1706,7 +1706,7 @@ emit_notifications (gpointer user_data)
subscribe (proxy);
}
return FALSE;
return FALSE;
}
/*
......@@ -1794,33 +1794,33 @@ server_handler (SoupServer *soup_server,
return;
}
/*
* Some UPnP stacks (hello, myigd/1.0) block when sending a NOTIFY, so
* call the callbacks in an idle handler so that if the client calls the
* device in the notify callback the server can actually respond.
*/
/*
* Some UPnP stacks (hello, myigd/1.0) block when sending a NOTIFY, so
* call the callbacks in an idle handler so that if the client calls the
* device in the notify callback the server can actually respond.
*/
emit_notify_data = emit_notify_data_new (hdr, seq, doc);
proxy->priv->pending_notifies =
g_list_append (proxy->priv->pending_notifies, emit_notify_data);
if (!proxy->priv->notify_idle_src) {
GUPnPContext *context;
GMainContext *main_context;
GUPnPContext *context;
GMainContext *main_context;
context = gupnp_service_info_get_context
context = gupnp_service_info_get_context
(GUPNP_SERVICE_INFO (proxy));
main_context = gssdp_client_get_main_context
main_context = gssdp_client_get_main_context
(GSSDP_CLIENT (context));
proxy->priv->notify_idle_src = g_idle_source_new();
g_source_set_callback (proxy->priv->notify_idle_src,
emit_notifications,
proxy->priv->notify_idle_src = g_idle_source_new();
g_source_set_callback (proxy->priv->notify_idle_src,
emit_notifications,
proxy, NULL);
g_source_attach (proxy->priv->notify_idle_src, main_context);
g_source_attach (proxy->priv->notify_idle_src, main_context);
g_source_unref (proxy->priv->notify_idle_src);
}
}
/* Everything went OK */
soup_message_set_status (msg, SOUP_STATUS_OK);
......@@ -1979,13 +1979,13 @@ subscribe_got_response (SoupSession *session,
/* Add actual timeout */
proxy->priv->subscription_timeout_src =
g_timeout_source_new_seconds (timeout);
g_source_set_callback
g_timeout_source_new_seconds (timeout);
g_source_set_callback
(proxy->priv->subscription_timeout_src,
subscription_expire,
proxy, NULL);
g_source_attach (proxy->priv->subscription_timeout_src,
main_context);
g_source_attach (proxy->priv->subscription_timeout_src,
main_context);
g_source_unref (proxy->priv->subscription_timeout_src);
}
......
......@@ -164,7 +164,7 @@ subscription_data_free (SubscriptionData *data)
g_free (data->sid);
if (data->timeout_src)
g_source_destroy (data->timeout_src);
g_source_destroy (data->timeout_src);
g_slice_free (SubscriptionData, data);
}
......@@ -1128,8 +1128,8 @@ subscribe (GUPnPService *service,
data->sid = generate_sid ();
/* Add timeout */
data->timeout_src = g_timeout_source_new_seconds (SUBSCRIPTION_TIMEOUT);
g_source_set_callback (data->timeout_src,
data->timeout_src = g_timeout_source_new_seconds (SUBSCRIPTION_TIMEOUT);
g_source_set_callback (data->timeout_src,
subscription_timeout,
data,
NULL);
......
......@@ -205,7 +205,7 @@ http_request_set_accept_language (SoupMessage *message)
g_free (lang);
soup_message_headers_append (message->request_headers,
"Accept-Language",
"Accept-Language",
tmp->str);
g_string_free (tmp, TRUE);
......@@ -295,7 +295,7 @@ http_response_set_content_locale (SoupMessage *msg,
http_language_from_locale (lang);
soup_message_headers_append (msg->response_headers,
"Content-Language",
"Content-Language",
lang);
g_free (lang);
......
......@@ -175,10 +175,10 @@ xml_util_get_attribute_contents (xmlNode *node,
xmlNode *
xml_util_real_node (xmlNode *node)
{
while (node && (node->type == XML_COMMENT_NODE ||
xmlIsBlankNode (node)))
node = node->next;
return node;
while (node &&
(node->type == XML_COMMENT_NODE || xmlIsBlankNode (node)))
node = node->next;
return node;
}
/* XML string creation helpers */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment