| 118 | } |
| 119 | |
| 120 | static PyObject * |
| 121 | msg_set_dst_uri(msgobject *self, PyObject *args) |
| 122 | { |
| 123 | str ruri; |
| 124 | |
| 125 | if (self->msg == NULL) { |
| 126 | PyErr_SetString(PyExc_RuntimeError, "self->msg is NULL"); |
| 127 | Py_INCREF(Py_None); |
| 128 | return Py_None; |
| 129 | } |
| 130 | |
| 131 | if ((self->msg->first_line).type != SIP_REQUEST) { |
| 132 | PyErr_SetString(PyExc_RuntimeError, "Not a request message - " |
| 133 | "set destination is not possible.\n"); |
| 134 | Py_INCREF(Py_None); |
| 135 | return Py_None; |
| 136 | } |
| 137 | |
| 138 | if(!PyArg_ParseTuple(args, "s:set_dst_uri", &ruri.s)) |
| 139 | return NULL; |
| 140 | |
| 141 | ruri.len = strlen(ruri.s); |
| 142 | |
| 143 | if (set_dst_uri(self->msg, &ruri) < 0) { |
| 144 | LM_ERR("Error in set_dst_uri\n"); |
| 145 | PyErr_SetString(PyExc_RuntimeError, "Error in set_dst_uri\n"); |
| 146 | } |
| 147 | |
| 148 | Py_INCREF(Py_None); |
| 149 | return Py_None; |
| 150 | } |
| 151 | |
| 152 | static PyObject * |
| 153 | msg_getHeader(msgobject *self, PyObject *args) |
nothing calls this directly
no test coverage detected