Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/jgrip/mineserver
Browse files Browse the repository at this point in the history
  • Loading branch information
fador committed Nov 28, 2010
2 parents e581e01 + 4838e9e commit b4b1d59
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/mineserver.cpp
Expand Up @@ -182,7 +182,7 @@ int Mineserver::Run(int argc, char *argv[])

if(m_socketlisten < 0)
{
fprintf(stderr, "Failed to create listen socket\n");
std::cerr << "Failed to create listen socket" << std::endl;
return 1;
}

Expand All @@ -197,13 +197,13 @@ int Mineserver::Run(int argc, char *argv[])
//Bind to port
if(bind(m_socketlisten, (struct sockaddr *)&addresslisten, sizeof(addresslisten)) < 0)
{
fprintf(stderr, "Failed to bind\n");
std::cerr << "Failed to bind" << std::endl;
return 1;
}

if(listen(m_socketlisten, 5) < 0)
{
fprintf(stderr, "Failed to listen to socket\n");
std::cerr << "Failed to listen to socket" << std::endl;
return 1;
}

Expand Down
4 changes: 4 additions & 0 deletions src/nbt.cpp
Expand Up @@ -231,6 +231,8 @@ NBT_Value::NBT_Value(eTAG_Type type, uint8 **buf, int &remaining) : m_type(type)
(*m_value.compoundVal)[key] = new NBT_Value((eTAG_Type)type, buf, remaining);
}
break;
case TAG_END:
break;
}
}

Expand Down Expand Up @@ -587,6 +589,8 @@ void NBT_Value::Write(std::vector<uint8> &buffer)
buffer.push_back(TAG_END);
break;
}
case TAG_END:
break; //for completeness
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/packets.h
Expand Up @@ -216,7 +216,7 @@ class Packet
{
uint32 nval;
memcpy(&nval, &val , 4);
htonl(nval);
nval = htonl(nval);
addToWrite(&nval, 4);
return *this;
}
Expand Down

0 comments on commit b4b1d59

Please sign in to comment.