Commit 3cd17e7d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid dummy "unknown option dccp-service" error

Signed-off-by: default avatarRémi Denis-Courmont <rem@videolan.org>
parent 9b978809
......@@ -125,12 +125,15 @@ int net_Socket (vlc_object_t *p_this, int family, int socktype,
#endif
#ifdef DCCP_SOCKOPT_SERVICE
char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service");
if (dccps != NULL)
if (socktype == SOL_DCCP)
{
setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps,
(strlen (dccps) + 3) & ~3);
free (dccps);
char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service");
if (dccps != NULL)
{
setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps,
(strlen (dccps) + 3) & ~3);
free (dccps);
}
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment