Skip to content

Commit

Permalink
Minor fixes for backward compatibility with legacy applications
Browse files Browse the repository at this point in the history
  • Loading branch information
rndi committed Oct 23, 2017
1 parent 044f494 commit eebe82f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
7 changes: 7 additions & 0 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,13 @@ int recvmsg(SRTSOCKET u, char* buf, int len, uint64_t& srctime)
return CUDT::recvmsg(u, buf, len, srctime);
}

int recvmsg(SRTSOCKET u, char* buf, int len)
{
uint64_t srctime;

return CUDT::recvmsg(u, buf, len, srctime);
}

int64_t sendfile(
SRTSOCKET u,
fstream& ifs,
Expand Down
19 changes: 16 additions & 3 deletions srtcore/udt.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ typedef std::set<SRTSOCKET> ud_set;
#define SRT_OHEADBW SRTO_OHEADBW
#define SRT_PASSPHRASE SRTO_PASSPHRASE
#define SRT_PBKEYLEN SRTO_PBKEYLEN
#define SRT_KMSTATE SRTO_KMSTATE
#define SRT_KMSTATE SRTO_RCVKMSTATE // FIXME: SRTO_KMSTATE is not implemented?
#define SRT_IPTTL SRTO_IPTTL
#define SRT_IPTOS SRTO_IPTOS
#define SRT_TLPKTDROP SRTO_TLPKTDROP
#define SRT_TSBPDMAXLAG SRTO_TSBPDMAXLAG
#define SRT_RCVNAKREPORT SRTO_RCVNAKREPORT
#define SRT_RCVNAKREPORT SRTO_NAKREPORT
#define SRT_CONNTIMEO SRTO_CONNTIMEO
#define SRT_SNDPBKEYLEN SRTO_SNDPBKEYLEN
#define SRT_RCVPBKEYLEN SRTO_RCVPBKEYLEN
Expand All @@ -184,7 +184,18 @@ typedef std::set<SRTSOCKET> ud_set;
/* Binary backward compatibility obsolete options */
#define SRT_NAKREPORT SRT_RCVNAKREPORT


typedef enum
{
INIT = SRTS_INIT,
OPENED = SRTS_OPENED,
LISTENING = SRTS_LISTENING,
CONNECTING = SRTS_CONNECTING,
CONNECTED = SRTS_CONNECTED,
BROKEN = SRTS_BROKEN,
CLOSING = SRTS_CLOSING,
CLOSED = SRTS_CLOSED,
NONEXIST = SRTS_NONEXIST
} UDTSTATUS;

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -303,6 +314,8 @@ class UDT_API CUDTException
static const int EINVPARAM = SRT_EINVPARAM;
static const int EINVSOCK = SRT_EINVSOCK;
static const int EUNBOUNDSOCK = SRT_EUNBOUNDSOCK;
static const int ESTREAMILL = SRT_EINVALMSGAPI;
static const int EDGRAMILL = SRT_EINVALBUFFERAPI;
static const int ENOLISTEN = SRT_ENOLISTEN;
static const int ERDVNOSERV = SRT_ERDVNOSERV;
static const int ERDVUNBOUND = SRT_ERDVUNBOUND;
Expand Down

0 comments on commit eebe82f

Please sign in to comment.