libsoup-CRITICAL **: soup_session_real_requeue_message: assertion 'item != NULL' failed



Hi all,

While trying to modify gstreamer’s souphttpclientsink element in order to support retry, I am getting the 
following assertion failure that I do not understand:

(gst-launch-1.0:32031): libsoup-CRITICAL **: soup_session_real_requeue_message: assertion 'item != NULL’ 
failed

Is anyone able to explain where it might have gone wrong? Am I using soup_session_requeue_message() correctly?

The callback code I am using looks like this:

static void
callback (SoupSession * session, SoupMessage * msg, gpointer user_data)
{
  GstSoupHttpClientSink *souphttpsink = GST_SOUP_HTTP_CLIENT_SINK (user_data);

  GST_DEBUG_OBJECT (souphttpsink, "callback status=%d %s",
      msg->status_code, msg->reason_phrase);

  g_mutex_lock (&souphttpsink->mutex);
  g_cond_signal (&souphttpsink->cond);

  if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) {
    if (souphttpsink->retry > 0) {
      soup_session_requeue_message(session, msg);
      GST_ELEMENT_WARNING (souphttpsink, RESOURCE, WRITE,
          ("Could not write to HTTP URI"),
          ("status: %d %s (retrying PUT after %d seconds)", msg->status_code,
              msg->reason_phrase, souphttpsink->retry));
      g_usleep (G_USEC_PER_SEC * souphttpsink->retry);
    }
    else {
      souphttpsink->status_code = msg->status_code;
      souphttpsink->reason_phrase = g_strdup (msg->reason_phrase);
      souphttpsink->message = NULL;
    }
    g_mutex_unlock (&souphttpsink->mutex);
    return;
  }

  souphttpsink->message = NULL;
  free_buffer_list (souphttpsink->sent_buffers);
  souphttpsink->sent_buffers = NULL;

  send_message_locked (souphttpsink);
  g_mutex_unlock (&souphttpsink->mutex);
}

Regards,
Graham
—



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]