Changeset 16187

Show
Ignore:
Timestamp:
04/23/08 10:40:55 (7 months ago)
Author:
piotras
Message:

Added mgd_info function as shortcut for missed g_info.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/core/midgard/src/midgard_error.c

    r15664 r16187  
    339339        return -1;       
    340340} 
     341 
     342/* temporary, we should use g_info, but it doesn't exist */ 
     343void mgd_info(const gchar *format, ...) 
     344{ 
     345        va_list args; 
     346        va_start (args, format); 
     347        g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args); 
     348        va_end (args); 
     349} 
  • trunk/midgard/core/midgard/src/midgard_error.h

    r15664 r16187  
    180180        g_signal_emit_by_name(str, "error");     
    181181 
     182 
     183extern void mgd_info(const gchar *format, ...); 
     184 
    182185G_END_DECLS 
    183186 
  • trunk/midgard/core/midgard/src/midgard_http_host.c

    r16179 r16187  
    2020#include "midgard_core_object.h" 
    2121#include "midgard_core_query_builder.h" 
     22#include "midgard_error.h" 
    2223 
    2324static void __list_string_free(GList *lst) 
     
    201202        g_assert(mgd != NULL); 
    202203 
     204        mgd_info("Creating new http_host (%s:%d%s).", name, port, uri); 
     205 
    203206        if(uri == NULL) { 
    204207                g_warning("Can not set NULL uri for request"); 
     
    232235                return NULL; 
    233236        } 
     237 
     238        gchar *hprefix, *hname; 
     239        guint hport; 
     240        g_object_get(G_OBJECT(host),  
     241                        "prefix", &hprefix,  
     242                        "name", &hname , 
     243                        "port", &hport, NULL); 
     244 
     245        mgd_info("Found host (%s:%d%s).", hname, hport, hprefix); 
    234246 
    235247        /* IMPORTANT! We must set sitegroup context NOW */ 
     
    257269        guint pint = 0; 
    258270 
    259         /* set prefix */ 
    260         g_object_get(G_OBJECT(host), "prefix", &pstr, NULL); 
    261         if(g_str_equal(prefix, pstr)) { 
     271        /* set prefix */         
     272        if(g_str_equal(prefix, hprefix)) { 
    262273                self->prefix = prefix; 
    263274        } else { 
     
    301312{ 
    302313        if(authinfo != NULL && *authinfo != '\0') {   
    303                 if(g_strstr_len((const gchar *)authinfo, strlen(authinfo), "auth"))     
     314                if(g_strstr_len((const gchar *)authinfo, strlen(authinfo), "auth")) {   
     315                        mgd_info("Setting required authentication flag"); 
    304316                        midgard_request_config_set_auth(rcfg, TRUE); 
     317                } 
    305318        } 
    306319 
     
    360373                authinfo = NULL; 
    361374        } 
    362  
    363  
    364375 
    365376        GList *list = NULL; 
     
    457468 
    458469        if(listl == 1) { 
     470                mgd_info("Trying to get attachment object ( FIXME )"); 
    459471                /* TODO, try to get attachment */ 
    460472        }