A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/94ff16837644b8f6a6a63348b89a1f0355695211 below:

[API] Removed unused srt_include(..) and srt_exclude(..) API functions · Haivision/srt@94ff168 · GitHub

@@ -1276,14 +1276,6 @@ int srt::CUDTUnited::groupConnect(CUDTGroup* pg, SRT_SOCKGROUPCONFIG* targets, i

1276 1276

CUDTGroup& g = *pg;

1277 1277

SRT_ASSERT(g.m_iBusy > 0);

1278 1278 1279 -

// The group must be managed to use srt_connect on it,

1280 -

// as it must create particular socket automatically.

1281 - 1282 -

// Non-managed groups can't be "connected" - at best you can connect

1283 -

// every socket individually.

1284 -

if (!g.managed())

1285 -

throw CUDTException(MJ_NOTSUP, MN_INVAL);

1286 - 1287 1279

// Check and report errors on data brought in by srt_prepare_endpoint,

1288 1280

// as the latter function has no possibility to report errors.

1289 1281

for (int tii = 0; tii < arraysize; ++tii)

@@ -3266,75 +3258,6 @@ SRTSOCKET srt::CUDT::createGroup(SRT_GROUP_TYPE gt)

3266 3258

return SRT_INVALID_SOCK;

3267 3259

}

3268 3260 3269 -

int srt::CUDT::addSocketToGroup(SRTSOCKET socket, SRTSOCKET group)

3270 -

{

3271 -

// Check if socket and group have been set correctly.

3272 -

int32_t sid = socket & ~SRTGROUP_MASK;

3273 -

int32_t gm = group & SRTGROUP_MASK;

3274 - 3275 -

if (sid != socket || gm == 0)

3276 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3277 - 3278 -

// Find the socket and the group

3279 -

CUDTSocket* s = uglobal().locateSocket(socket);

3280 -

CUDTUnited::GroupKeeper k(uglobal(), group, CUDTUnited::ERH_RETURN);

3281 - 3282 -

if (!s || !k.group)

3283 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3284 - 3285 -

// Check if the socket is already IN SOME GROUP.

3286 -

if (s->m_GroupOf)

3287 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3288 - 3289 -

CUDTGroup* g = k.group;

3290 -

if (g->managed())

3291 -

{

3292 -

// This can be changed as long as the group is empty.

3293 -

if (!g->groupEmpty())

3294 -

{

3295 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3296 -

}

3297 -

g->set_managed(false);

3298 -

}

3299 - 3300 -

ScopedLock cg(s->m_ControlLock);

3301 -

ScopedLock cglob(uglobal().m_GlobControlLock);

3302 -

if (g->closing())

3303 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3304 - 3305 -

// Check if the socket already is in the group

3306 -

srt::groups::SocketData* f;

3307 -

if (g->contains(socket, (f)))

3308 -

{

3309 -

// XXX This is internal error. Report it, but continue

3310 -

LOGC(aclog.Error, log << "IPE (non-fatal): the socket is in the group, but has no clue about it!");

3311 -

s->m_GroupMemberData = f;

3312 -

s->m_GroupOf = g;

3313 -

return 0;

3314 -

}

3315 -

s->m_GroupMemberData = g->add(srt::groups::prepareSocketData(s));

3316 -

s->m_GroupOf = g;

3317 - 3318 -

return 0;

3319 -

}

3320 - 3321 -

// dead function as for now. This is only for non-managed

3322 -

// groups.

3323 -

int srt::CUDT::removeSocketFromGroup(SRTSOCKET socket)

3324 -

{

3325 -

CUDTSocket* s = uglobal().locateSocket(socket);

3326 -

if (!s)

3327 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3328 - 3329 -

if (!s->m_GroupOf)

3330 -

return APIError(MJ_NOTSUP, MN_INVAL, 0);

3331 - 3332 -

ScopedLock cg(s->m_ControlLock);

3333 -

ScopedLock glob_grd(uglobal().m_GlobControlLock);

3334 -

s->removeFromGroup(false);

3335 -

return 0;

3336 -

}

3337 - 3338 3261

// [[using locked(m_ControlLock)]]

3339 3262

// [[using locked(CUDT::s_UDTUnited.m_GlobControlLock)]]

3340 3263

void srt::CUDTSocket::removeFromGroup(bool broken)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4