Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,8 @@ static PyObject* getladdrs(PyObject* dummy, PyObject* args)

static PyObject* sctp_send_msg(PyObject* dummy, PyObject* args)
{
int fd, msg_len, size_sent, ppid, flags, stream, ttl, context;
int fd, msg_len, size_sent, flags, stream, ttl, context;
int ppid;
const char *msg;
char *to;
int port;
Expand Down
4 changes: 2 additions & 2 deletions sctp.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"""

from __future__ import print_function

from socket import *
import socket
import _sctp

Expand Down Expand Up @@ -1175,7 +1175,7 @@ def sctp_send(self, msg, to=("",0), ppid=None, flags=0, stream=None, timetolive=
recordlog = open(recordfilename+"%d"%i, 'w')
recordlog.write(msg)
recordlog.close()
return _sctp.sctp_send_msg(self._sk.fileno(), msg, to, ppid, flags, stream, timetolive, context)
return _sctp.sctp_send_msg(self._sk.fileno(), msg, to, ntohl(ppid), flags, stream, timetolive, context)

def sctp_recv(self, maxlen):
"""
Expand Down