Changeset b75671d for lib


Ignore:
Timestamp:
2015-06-17T22:47:26Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
b441614
Parents:
d832164 (diff), 2f99f23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into parson

Location:
lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lib/events_glib.c

    rd832164 rb75671d  
    8282        }
    8383
    84         event_debug("gaim_io_invoke( %d, %d, 0x%x )\n", g_io_channel_unix_get_fd(source), condition, data);
     84        event_debug("gaim_io_invoke( %d, %d, %p )\n", g_io_channel_unix_get_fd(source), condition, data);
    8585
    8686        st = closure->function(closure->data, g_io_channel_unix_get_fd(source), gaim_cond);
     
    101101static void gaim_io_destroy(gpointer data)
    102102{
    103         event_debug("gaim_io_destroy( 0x%x )\n", data);
     103        event_debug("gaim_io_destroy( 0%p )\n", data);
    104104        g_free(data);
    105105}
     
    127127                                 gaim_io_invoke, closure, gaim_io_destroy);
    128128
    129         event_debug("b_input_add( %d, %d, 0x%x, 0x%x ) = %d (%p)\n", source, condition, function, data, st, closure);
     129        event_debug("b_input_add( %d, %d, %p, %p ) = %d (%p)\n", source, condition, function, data, st, closure);
    130130
    131131        g_io_channel_unref(channel);
     
    140140        gint st = g_timeout_add(timeout, (GSourceFunc) func, data);
    141141
    142         event_debug("b_timeout_add( %d, %d, %d ) = %d\n", timeout, func, data, st);
     142        event_debug("b_timeout_add( %d, %p, %p ) = %d\n", timeout, func, data, st);
    143143
    144144        return st;
  • lib/misc.c

    rd832164 rb75671d  
    751751        return end - string;
    752752}
     753
     754/* Parses a guint64 from string, returns TRUE on success */
     755gboolean parse_int64(char *string, int base, guint64 *number)
     756{
     757        guint64 parsed;
     758        char *endptr;
     759
     760        errno = 0;
     761        parsed = g_ascii_strtoull(string, &endptr, base);
     762        if (errno || endptr == string || *endptr != '\0') {
     763                return FALSE;
     764        }
     765        *number = parsed;
     766        return TRUE;
     767}
     768
  • lib/misc.h

    rd832164 rb75671d  
    149149G_MODULE_EXPORT char *get_rfc822_header(const char *text, const char *header, int len);
    150150G_MODULE_EXPORT int truncate_utf8(char *string, int maxlen);
     151G_MODULE_EXPORT gboolean parse_int64(char *string, int base, guint64 *number);
    151152
    152153#endif
  • lib/oauth2.c

    rd832164 rb75671d  
    138138        struct oauth2_access_token_data *cb_data = req->data;
    139139        char *atoken = NULL, *rtoken = NULL, *error = NULL;
    140         char *content_type;
     140        char *content_type = NULL;
    141141
    142         if (getenv("BITLBEE_DEBUG") && req->reply_body) {
     142        if (req->status_code <= 0 && !req->reply_body) {
     143                cb_data->func(cb_data->data, NULL, NULL, req->status_string);
     144                g_free(cb_data);
     145                return;
     146        }
     147
     148        if (getenv("BITLBEE_DEBUG")) {
    143149                printf("%s\n", req->reply_body);
    144150        }
Note: See TracChangeset for help on using the changeset viewer.